import { request } from "@/api/request";

export function hotBooking(params) {
  return request(
    {
      url: "/web/booking/hot",
      method: "get",
      params,
    },
    false
  );
}

export function hotBidding(params) {
  return request(
    {
      url: "/web/bidding/hot",
      method: "get",
      params,
    },
    false
  );
}

export function biddingSuccess() {
  return request(
    {
      url: "/web/bidding/success",
      method: "get",
    },
    false
  );
}

export function getBookingChannel() {
  return request(
    {
      url: "/web/booking/channel",
      method: "get",
    },
    false
  );
}

// 域名构造列表
export function getDomainTypes() {
  return request(
    {
      url: "/web/domain/type",
      method: "get",
    },
    true
  );
}

// 域名后缀列表
export function getDomainSuffix() {
  return request(
    {
      url: "/web/domain/suffix",
      method: "get",
    },
    false
  );
}

// 获取域名查询条件
export function getFilterList() {
  return request(
    {
      url: "/web/domain/queryTerm",
      method: "get",
    },
    false
  );
}

// 获取域名预订列表
export function getBookingList(data) {
  return request(
    {
      url: "/web/booking/pageList",
      method: "post",
      data,
    },
    false
  );
}

// 获取域名竞价列表
export function getBiddingList(data) {
  return request(
    {
      url: "/web/bidding/pageList",
      method: "post",
      data,
    },
    false
  );
}

// 根据id获取域名详情
export function getDNDetail(id) {
  return request(
    {
      url: "/web/booking/info/" + id,
      method: "get",
    },
    false
  );
}

// 域名检查
export function checkDomain(data) {
  return request(
    {
      url: "/web/domain/check",
      method: "post",
      data,
    },
    false
  );
}

// 域名价格
export function getDnPrice(type) {
  return request(
    {
      url: "/web/domain/priceList/" + type,
      method: "get",
    },
    false
  );
}

// 获取首页内容
export function getHome(params) {
  return request(
    {
      url: "/web/content/index",
      method: "get",
      params,
    },
    false
  );
}

// 获取资讯类型
export function getNewsType() {
  return request(
    {
      url: "/web/content/consult/typeList",
      method: "get",
    },
    false
  );
}

// 获取资讯列表
export function getNewsList(params) {
  return request(
    {
      url: "/web/content/consult/type",
      method: "get",
      params,
    },
    false
  );
}

// 获取资讯排行榜
export function getNewsRanking(params) {
  return request(
    {
      url: "/web/content/consult/ranking",
      method: "get",
      params,
    },
    false
  );
}

// 获取资讯推荐
export function getNewsRecommend() {
  return request(
    {
      url: "/web/content/consult/recommend",
      method: "get",
    },
    false
  );
}

// 获取资讯详情
export function getNewsDetail(consultId) {
  return request(
    {
      url: "/web/content/consult/" + consultId,
      method: "get",
    },
    false
  );
}

// 获取帮助中心详情
export function getAboutDetail(helpId) {
  return request(
    {
      url: "/web/content/help/" + helpId,
      method: "get",
    },
    false
  );
}

// 搜索域名
export function searchDN(params) {
  return request(
    {
      url: "/web/domain/indexSearch",
      method: "get",
      params,
    },
    false,
    "MessageBox"
  );
}

// 获取TDK
export function getTDK() {
  return request(
    {
      url: "/web/sys/tdk",
      method: "get",
    },
    false
  );
}

// 获取底部信息
export function getBottom() {
  return request(
    {
      url: "/web/sys/bottom",
      method: "get",
    },
    false
  );
}

//提交一口价

export function  fixSubmit(data) {
  return request(
    {
      url: "/web/fix/submit",
      method: "post",
      data,
    },
    true
  );
}



